package com.ruoyi.xiaoshou.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;

import com.ruoyi.system.api.domain.store.StockIn;
import com.ruoyi.xiaoshou.domain.SaleBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author 罗梦杰
 * date 2024/11/9 10:58
 * @version 1.0
 */
@FeignClient(contextId = "RemoteSaleBackService", value = ServiceNameConstants.XIAOSHOU_SERVICE)
public interface RemoteSaleBackService {
    @PostMapping("/saleBack/refreshStatusByStockIn")
    R<String> refreshStatus(@RequestBody StockIn stockIn);
    @PostMapping("/saleBack/getSaleBackByCode")
    R<SaleBack> getSaleBackByCode(@RequestBody String code);

    @PostMapping("/saleBack/innerEditByCode")
    R<Boolean> innerEditByCode(@RequestBody SaleBack saleBack,@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
